package fr.umlv.ig.tests;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JFrame;
import javax.swing.JLabel;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		JFrame frame = new JFrame();
		
		MyMap m = new MyMap(6,47,2);
		
		JLabel map = m.getMap();
		
		map.addMouseMotionListener(new MouseAdapter() {

			@Override
			public void mouseMoved(MouseEvent e) {
				// We know the center is lat:47 long:2
				// 320;320 --> 47;2
				System.out.println(e.getX()+";"+e.getY());
				super.mouseMoved(e);
			}
			
		});
		
		frame.add(map);
		
		
		
		frame.setVisible(true);
		frame.pack();

	}

}
